import { Route,Switch } from "react-router-dom";
import {Layout} from 'antd';
import {route} from './router/index';
import Header from './component/header';



export default function App() {

  return (

    <>
      <Layout classNane="page">
        <Header />
        <Layout.Content>
        <div className="wrap">

            <Switch>
                {route.map((itemData, index) => {
                    return (
                        <Route
                            key={index}
                            path={itemData.path}
                            exact={itemData.exact}
                            render={(props) => {
                                return itemData.render(props);
                            }}
                        ></Route>
                    );
                })}
            </Switch>
        </div>
        </Layout.Content>
        {/* <Footer /> */}
      </Layout>
    </>
  )
}
